package com.xhwy.controller;

import com.xhwy.entity.UserType;
import com.xhwy.service.UserTypeService;
import com.xhwy.util.PageUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.sql.DataSource;

@RestController
@RequestMapping("/userType")
public class UserTypeController {
    @Autowired
    private UserTypeService userTypeService;

    /**
     * 分页查询
     *
     * @param userType 筛选条件
     * @param pageUtil 分页对象
     * @return 查询结果
     */
    @GetMapping
    public PageUtil<UserType> queryAllByLimit(UserType userType, PageUtil<UserType> pageUtil){
        return userTypeService.queryAllUserTypesByLimit(userType, pageUtil);
    }
}
